package com.acc.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
/**
 * 
 * @author 朱春阳
 *
 */
public class Generate_orderId {
	
	public static String create_OrederId() {
        String date = new SimpleDateFormat("yyyyMMdd").format(new Date());  
        String seconds = new SimpleDateFormat("HHmmss").format(new Date());  
        String orderId = date + "00001000" + getTwo() + "00" + seconds + getTwo();  
        return orderId;
	}
	
	  public static String getTwo(){  
	        Random rad=new Random();  
	  
	        String result  = rad.nextInt(100) + "";  
	  
	        if(result.length() == 1){  
	            result = "0" + result;  
	        }  
	        return result;  
	    }

}
